#-*- coding: utf-8 -*-
from time import sleep, time
from  selenium  import  webdriver
from selenium.webdriver.common.by import By

driver  = webdriver.Chrome()
driver.get('http://www.baidu.com')
driver.find_element(By.ID,'kw').send_keys('霍格沃兹测试开发')
sleep(2)
driver.find_element(By.ID,'su').click()
sleep(2)
driver.find_element(By.ID,'kw').clear()
sleep(1)

driver.switch_to.frame()
driver.switch_to.default_content()
driver.switch_to.parent_frame()